﻿//-----------------------------------------------------------------------
// <copyright file="ICultureManager.cs" company="WpfDevelopment.com">
//     Copyright WpfDevelopment.com. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace WpfDevelopment.MVVM
{
    using System;
    using System.ComponentModel;
    using System.Diagnostics.CodeAnalysis;
    using System.Diagnostics.Contracts;
    using System.Dynamic;

    /// <summary>
    /// Interface for the culture resource manager
    /// </summary>
    [ContractClass(typeof(ICultureManagerContract))]
    public interface ICultureManager
    {
        /// <summary>
        /// Occurs when [culture changed event].
        /// </summary>
        event EventHandler<EventArgs> CultureChangedEvent;

        /// <summary>
        /// Occurs when [property changed].
        /// </summary>
        event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// Tries the get member.
        /// </summary>
        /// <param name="binder">The binder.</param>
        /// <param name="result">The result.</param>
        /// <returns>true if the value can be retrieved, false if it fails to retrieve the value</returns>
        [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Object was used here, because generics is not supported in WPF")]
        bool TryGetMember(GetMemberBinder binder, out object result);
    }
}
